import request from '@/utils/request'

export function getRoleList() {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/admin/role/roleList',
    method: 'get'
  })
}

export function addRole(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/admin/role/add',
    method: 'post',
    data: params
  })
}

export function editRole(params) {
  return addRole(params)
}

export function deleteRole(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/admin/role/delete/'+params,
    method: 'get'
  })
}
